1. Field of the Invention
This invention relates generally to the field of computer graphics and, more particularly, to estimating the polygon rendering performance of three-dimensional graphics systems.
2. Description of the Related Art
A computer system typically relies upon its graphics system for producing visual output on the computer screen or display device. Early graphics systems were only responsible for taking what the processor produced as output and displaying it on the screen. In essence, they acted as simple translators or interfaces. Modem graphics systems, however, incorporate graphics processors with a great deal of processing power. They now act more like coprocessors rather than simple translators. This change is due to the recent increase in both the complexity and amount of data being sent to the display device. For example, modern computer displays have many more pixels, greater color depth, and higher refresh rates than earlier models. Similarly, the images displayed are now more complex and may involve advanced rendering techniques such as anti-aliasing and texture mapping.
As a result, without considerable processing power in the graphics system, the CPU would spend a great deal of time performing graphics calculations. This could rob the computer system of the processing power needed for performing other tasks associated with program execution and thereby dramatically reduce overall system performance. With a powerful graphics system, however, when the CPU is instructed to draw a box on the screen, the CPU is freed from having to compute the position and color of each pixel. Instead, the CPU may send a request to the video card stating "draw a box at these coordinates." The graphics system then draws the box, freeing the processor to perform other tasks.
Generally, a graphics system in a computer (also referred to as a graphics accelerator) is a type of video adapter that contains its own processor to boost performance levels. These processors are specialized for computing graphical transformations, so they tend to achieve better results than the general-purpose CPU used by the computer system. In addition, they free up the computer's CPU to execute other commands while the graphics system is handling graphics computations. The popularity of graphical applications, and especially multimedia applications, has made high performance graphics systems a common feature of computer systems. Most computer manufacturers now bundle a high performance graphics system with their systems.
Since graphics systems typically perform only a limited set of functions, they may be customized and therefore far more efficient at graphics operations than the computer's general purpose central processor. While early graphics systems were limited to performing two-dimensional (2D) graphics, their functionality has now grown to also include three-dimensional (3D) graphics rendering, including 3D graphics operations such as shading, fogging, alpha-blending, and specular highlighting.
The processing power of 3D graphics systems has been improving at a breakneck pace. A few years ago, shaded images of simple objects could only be rendered at a few frames per second, while today's systems support rendering of complex objects at 60 Hz or higher. This higher performance allows modern graphics applications to increase the realism of the scene being displayed.
One common method used to increase the realism of three-dimensional rendered objects is to increase the number of polygons used to display the object. Most modern graphics systems render objects by first dividing or "tessellating" the surface of the object into a number of polygons (i.e., closed plane figures bounded by straight lines). Each polygon is then rendered individually. Rendering typically involves the following steps: (1) calculating a number of parameters for each vertex of the polygon, and (2) interpolating from the vertex parameters to fill in the polygon. Examples of vertex parameters may include color information, translucency information, depth information, lighting information, and texture information.
By increasing the number of polygons used to display an object, the object may appear smoother and may have a more realistic textured appearance. FIG. 1A illustrates a sphere tessellated into a first number of polygons. FIG. 1B is an example of the same sphere tessellated into a much higher number of polygons. As shown by the figures, a more realistic scene may be rendered by using larger numbers of smaller polygons. Note since all polygons are typically broken into triangles for rendering, the terms "polygon" and "triangle" shall be used interchangeably herein.
Wherein this technique improves realism, it also increases the processing burden on a graphics system. Previous graphics applications used large polygons that contained a large number of pixels. Thus, the "overhead" of setting up each polygon consumed a relatively small portion of the graphics system's overall processing resources, while the process of interpolating the pixelswithin the polygon used the majority of the graphic system's processing power. These systems are referred to as "pixel fill limited" because the limiting performance factor is the number of pixels the graphics system is capable of calculating. Modern applications, however, are now using polygons that may contain only one or two pixels (or even less than one pixel, in some cases). Thus, the work of setting up polygons may need more time than the actual pixel calculation process. These systems are referred to as "polygon overhead limited" because the overhead associated with setting up polygons is the performance limiting factor. Note a particular graphics system may be polygon overhead limited for a particular scene (e.g., one with many small polygons) and pixels fill limited for a diferent scene (e.g., one with larger polygons or more complex pixel-level enhancements).
FIG. 2 is a graph illustrating one possible performance limit curve for a graphics system. As shown in the figure, once the polygon area falls below a particular size a.sub.c, the system's performance is limited by the polygon overhead. Similarly, once, the polygon size rises above ac, performance is limited by the maximum pixel fill rate.
As previously noted, the processing power of graphics systems has increased rapidly in the past few years. However, even with these great increases, new applications continue to demand even greater performance. For example, some computer games and virtual reality programs require real time rendering of multiple, complex, three-dimensional objects at high frame rates. These graphics intensive applications place high demands upon graphics system performance and may easily exceed the graphics system's capabilities.
One possibility is to lower the frame rate when the application exceeds the performance capabilities of the graphics system. However, this is not always possible because some graphics applications have minimum frame rates below which the applications become unusable. For example, if the frame rate of a 3D computer game falls below a certain level, the movements and animation on the screen will become jerky. Furthermore, if the frame rate drops below a critical level, then the delay between when the user performs an action (e.g., firing a missile) and a graphic representation of that action appearing on the screen will be so long as to make the game unplayable. Thus, for many applications the frame rate may not be lowered below a certain predetermined level, even when the complexity of the scene being rendered increases dramatically.
In contrast, however, if the system is polygon overhead limited, the number of polygons displayed can be adjusted without the limitations and drawbacks that lowering the frame rate has. For example, assuming a particular graphics system that can render a maximum of 1000 polygons per frame at a particular frame rate (due to polygon overhead), if a single moving sphere is displayed, then the sphere may be divided (i.e., "tessellated") into no more than 1000 polygons without affecting the frame rate. If two similar moving spheres are displayed, the graphics system can either cut the frame rate in half (with the negative side effects discussed above), or it can display each sphere using only 500 polygons. Using the second alternative may result in the spheres appearing more jagged (i.e., the sphere's surfaces will not appear as smooth), but without any added jerkiness to their movement. This technique may also be referred to as reducing the level-of-detail (LOD) of the scene.
If the system is pixel fill limited, another alternative to reducing the frame rate is to reduce the overall number of pixels being rendered. The may be accomplished by reducing the pixel area of a given objection, reducing the number of objects displayed, or by reducing the number of pixels in the overall scene.
Ideally, the graphics system would be able to accurately determine the optimum size and number of polygons and the optimum number of pixels. This would allow the graphics system to optimize the displayed scene to contain the maximum number of polygons without lowering the frame rate and without wasting performance on polygon overhead.
Thus, a graphics system capable of efficiently determining the performance limits for a particular scene is desired. Similarly, a method for efficiently determining graphics system performance limits is also desired.